﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using Services;
using System.Web.Mvc;

namespace ActionServices
{
    public interface ISearchActionService
    {
        IList<User> SearchUser(string name, string username, string email, string groupid);
        IList<Search> SearchAll(string value);
        List<SelectListItem> GetSelectListCategory();
        IList<Search> SearchByLimit(string value, int limit);
    }
   public class SearchActionService:ISearchActionService
    {
        SearchService Service;

       public SearchActionService(SearchService _Service)
       {
           Service = _Service;
       }

       public virtual IList<User> SearchUser(string name, string username, string email, string groupid)
       {
           return Service.SearchUser(name, username, email, groupid);
       }



       public virtual IList<Search> SearchAll(string value) {
           return Service.SearchAll(value);
       }

       public virtual List<SelectListItem> GetSelectListCategory() {
           return Service.GetSelectListCategory();
       }

       public IList<Search> SearchByLimit(string value, int limit) { 
        return Service.SearchByLimit(value, limit);
       }

    }
}
